<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h3 id="h3">我是标题</h3>
		<div id="div1" style="width: 100px; height: 30px; background-color: red;" class="classdiv1">
			第一个div
			<p id="pp">p1</p>
			<p>p2</p>
			<p>p3</p>
			<p>p4</p>
			<p>p5</p>
		</div>
		
		<div id="div2" style="width:100px; height: 30px; background-color: yellow;">
			第二个div
			<input type="image" id="img" name="img1" value="ii" />
		</div>
		
		<div id="div3" style="width:100px; height: 30px; background-color: blue;">
			第三个div
			<ul id='ul1'>
				<li>
					
				</li>
			</ul>
		</div>
		<button type="button" onclick="Chat()">查找</button>
	</body>
		<script type="text/javascript">
			function Chat(){
				var a = document.getElementById('div1');
				console.log(a);
				var b = document.getElementsByClassName('classdiv1');
				console.log(b);
				var c = document.getElementsByTagName('input');
				console.log(c);
				var d = document.getElementsByTagName('ul');
				console.log(d);
				var e = document.getElementsByTagName('p');
				console.log(e);
				var f = document.getElementsByTagName('li');
				console.log(f);
			}
		</script>
</html>
